import request from '@/utils/request'
export function getBusinesses () {
  return request({
    url: '/api/Flow/FlowManage/GetBusinesses',
    method: 'get'
  })
}

export function getBusinessTree () {
  return request({
    url: '/api/Flow/FlowManage/GetBusinessTree',
    method: 'get'
  })
}

export function getFlows (params) {
  return request({
    url: '/api/Flow/FlowManage/GetFlows',
    method: 'get',
    params
  })
}

export function setFlowOnline (flowId) {
  return request({
    url: '/api/Flow/FlowManage/SetFlowOnline',
    method: 'get',
    params: { flowId }
  })
}

export function setFlowOffline (flowId) {
  return request({
    url: '/api/Flow/FlowManage/SetFlowOffline',
    method: 'get',
    params: { flowId }
  })
}

export function deleteFlow (flowId) {
  return request({
    url: '/api/Flow/FlowManage/DeleteFlow',
    method: 'get',
    params: { flowId }
  })
}